package com.zhmy.xmgl;

import com.eos.das.entity.IDASCriteria;
import com.eos.das.entity.criteria.CriteriaType;
import com.eos.foundation.PageCond;
import com.eos.spring.DASDaoSupport;
import com.zhmy.xmgl.ZHMY_PROJECT_MANAGE.ZhmySchedule;

import commonj.sdo.DataObject;

public class ZhmyScheduleDao extends DASDaoSupport {
	
	public void addZhmySchedule(ZhmySchedule zhmyScheule) {
		getDASTemplate().getPrimaryKey(zhmyScheule);
		getDASTemplate().insertEntity(zhmyScheule);
	}
	
	public void deleteZhmySchedule(ZhmySchedule[] zhmyScheules) {
		for(DataObject zhmySchedule:zhmyScheules) {
			getDASTemplate().deleteEntityCascade(zhmySchedule);
		}
	}
	
	public void getZhmySchedule(ZhmySchedule zhmyScheule) {
		getDASTemplate().expandEntity(zhmyScheule);
	}
	
	public ZhmySchedule[] queryZhmySchedules(CriteriaType criteriaType, PageCond pageCond) {
		IDASCriteria dasCriteria = getDASTemplate().criteriaTypeToDASCriteria(criteriaType);
		return getDASTemplate().queryEntitiesByCriteriaEntityWithPage(ZhmySchedule.class, dasCriteria, pageCond);
	}
	
	public void updateZhmySchedule(ZhmySchedule zhmySchedule) {
		getDASTemplate().updateEntity(zhmySchedule);
	}

}
